import { createRequestTypes } from '@UTILS/reduxHelper'

export const GET_RECOMMEND_DOCTORS = createRequestTypes('GET_RECOMMEND_DOCTORS')
export const GET_DOCTOR_DETAIL = createRequestTypes('GET_DOCTOR_DETAIL')
export const SYNC_DOCTOR_DETAIL = createRequestTypes('SYNC_DOCTOR_DETAIL')
export const GET_DOCTOR_BY_TAG_IDS = createRequestTypes('GET_DOCTOR_BY_TAG_IDS')
export const GET_DOCTOR_BY_TAG_ID = createRequestTypes('GET_DOCTOR_BY_TAG_ID')
export const GET_RECOMMEND_DOCTORS_HOME = createRequestTypes('GET_RECOMMEND_DOCTORS_HOME')
export const GET_DOCTORS = createRequestTypes('GET_DOCTORS')
export const SET_CURR_DCOTORDETAIL = createRequestTypes('SET_CURR_DCOTORDETAIL')

export default {
  dispatchGetRecommendDoctors(payload) {
    return {
      type: GET_RECOMMEND_DOCTORS.REQUEST,
      payload
    }
  },
  dispatchGetDoctorDetail(payload, disabledLoading, callback) {
    return {
      type: GET_DOCTOR_DETAIL.REQUEST,
      payload,
      disabledLoading,
      callback
    }
  },
  dispatchSyncDoctorDetail() {
    return {
      type: SYNC_DOCTOR_DETAIL.REQUEST
    }
  },
  dispatchGetDoctorsByTagIds(payload) {
    return {
      type: GET_DOCTOR_BY_TAG_IDS.REQUEST,
      payload
    }
  },
  dispatchGetDoctorsByTagId(payload) {
    return {
      type: GET_DOCTOR_BY_TAG_ID.REQUEST,
      payload
    }
  },
  dispatchGetRecommendDoctorsHome(payload) {
    return {
      type: GET_RECOMMEND_DOCTORS_HOME.REQUEST,
      payload
    }
  },
  dispatchGetDoctors(payload) {
    return {
      type: GET_DOCTORS.REQUEST,
      payload
    }
  },
  dispatchSetCurrDoctorDetail(payload) {
    return {
      type: SET_CURR_DCOTORDETAIL.REQUEST,
      payload
    }
  }
}
